DIFFKWCV

This program will compute the critical values of performing a Kruskal-Wallis test to differentiate between which samples are truly different. The user will be asked to input the following:
1) The alpha significance level
2) Whether you have data or stats. If you have data, you may enter up to four lists for ranking purposes. If you choose stats you many enter more lists.
3) If you choose stats you enter the following:
3a) The number of lists
3b) The sum of ranks
3c) The size
3d) Which two lists are compared so you must enter in at least 2 lists.
4) If you choose data you enter the following:
4a) Number of lists, remember you are limited to four here
4b) The lists themselves (the program will rank the data)

After this information is entered in, the program will ask you which two lists are to be compared. Enter this information as a list {first list, second list}. The program will output the following:
1) The absolute difference between the average ranks of the data: you may find the average ranks for all lists in L3.
2) The critical value as computed via formula.
3) The decision to make based on the test, whether the difference is significant or not.

The program will clear all lists when run at the beginning. 
Variables Used:
A = alpha level
C = critical value
D = absolute difference
L = number of lists when using data, dimension of LRNKT1
K = number of lists when using stats, counter when ranking data
Theta = number of lists
L1 = sum of ranks of data
L2 = sample sizes for each data list
L3 = average ranks
L6 = which two lists to compare
LRNKT1
LRNKT2
LRNKT3
LRNKT4
LRNKT5 are all lists used to generate and store ranked data when using the data option, these are deleted after the program is complete. 
N = dimension of LRNKT5
J = counter for loops 
X = variable for sequencing ranks
I = counter for output list numbers
R = sum of ranks of data when using the stats option
M = counter for ranking data in the data option, sample size in the stats option
B = critical value from chi-square distribution with K - 1 degrees of freedom and alpha level to the right

P-values are not displayed because the distribution is asympotically approximated by a chi-square distribution, so results in terms of p-values may not be exact. 
Enjoy!